# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=font-raleway
pkgver=4.101
pkgrel=1
pkgdesc="An elegant sans-serif font family, now 9 weights and italic style"
url="https://www.theleagueofmoveabletype.com/raleway"
arch="noarch"
license="OFL-1.1"
depends="
	$pkgname-otf
	$pkgname-ttf
	"
subpackages="$pkgname-otf $pkgname-ttf"
source="https://github.com/theleagueof/raleway/releases/download/$pkgver/Raleway-$pkgver.tar.xz"
options="!check" # No code to test
builddir="$srcdir/Raleway-$pkgver"

package() {
	mkdir -p "$pkgdir"
}

otf() {
	depends=""

	cd "$builddir"/static/OTF
	find . -name "*.otf" -maxdepth 1 | while read -r i; do
		install -Dm644 $i -t "$subpkgdir"/usr/share/fonts/OTF/
	done
}

ttf() {
	depends=""

	cd "$builddir"/static/TTF
	find . -name "*.ttf" -maxdepth 1 | while read -r i; do
		install -Dm644 $i -t "$subpkgdir"/usr/share/fonts/TTF/
	done
}
sha512sums="cbe3a2cc38535c89645d87ee6cb9e0eeb72b09877ba7fa3197b88ceb09c510758bb3b3653ed3f6c4d502b6ab04cd6095d4014d5dc26d1b8ef5e02495b40a9a58  Raleway-4.101.tar.xz"
